#include "TimeHandler.hpp"

// Our namespaces
namespace mindsweeper {
namespace main {

double TimeHandler::getDt() {
	return this->dt;
}

void TimeHandler::update() {
	// Update the delta time (Technically, this isn't perfect, but it's close enough.)
	this->dt = clock.GetElapsedTime();
	clock.Reset();

	// Prevent large dt values from occurring.
	if (this->dt > MAX_FRAME_TIME)
		this->dt = MAX_FRAME_TIME;
}

// End namespaces
}
}
